package com.yx.changdao.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yx.changdao.common.entity.Problem;
import com.yx.changdao.common.entity.ProblemApply;
import com.yx.changdao.common.exception.AlertException;
import com.yx.changdao.common.vo.ApplyProblemVO;

import java.util.List;


/**
 * @Description: <br/>
 * 问题申请记录
 * <p>
 * <br/>
 * @Auther: wangzd
 * @create 2020/04/03 16:51
 */
public interface ProblemApplyService extends IService<ProblemApply> {

    /**
     * 查询申请记录list 连带问题
     */
    IPage<ApplyProblemVO> pageNex(IPage<ApplyProblemVO> page, QueryWrapper<ApplyProblemVO> queryWrapper);


    /**
     * 查询单个 连带问题
     */
    ApplyProblemVO byId(Integer id);

    /**
     * 同意申请
     */
    boolean agree(Integer applyId,List<Integer> depIds)throws AlertException;

    /**
     * 批量同意
     */
    boolean agreeBatch(List<Integer> applyIds,List<Integer> depIds)throws AlertException;

    /**
     * 拒绝申请
     */
    boolean reject(Integer applyId)throws AlertException;


    /**
     * 批量拒绝
     */
    boolean rejectBatch(List<Integer> applyIds)throws AlertException;
}
